namespace py scms_service.provider
namespace java com.xhs.hawaii.thrift.scms.scms
/*
	国际物流 工作流的信息定义
*/

namespace py scms_service.provider
/*
	联系人信息
*/
struct ProviderContactor{
  // 联系人id
  1: string id,
  // 名称
  2: string name,
  // 职位
  3: string position,
  // 国国家代码-本国号码
  4: string phone,
  5: string email,
  6: bool is_deactive,
  7: string qq,
  8: string note,
}


/*
	地址信息
*/
struct ProviderAddress{
  // 城市id，绑定城市服务
  1: string city_id,
  2: string addr_line1,
  3: string addr_line2,
  // 邮编
  4: string zip_code,
  5: string province_id,
  6: string country_id
}

/*
	资质信息
*/
struct ProviderCredentials{
  // 营业执照
  1: list<string> license,
  // 税务登记
  2: list<string> tax_regist,
  // 组织机构代码
  3: list<string> org_code,
  // 开户许可证
  4: list<string> opening,
  // 付款信息证明
  5: list<string> pay_info,
  // 其他
  6: list<string> others,
  // 合同
  7: list<string> contracts,
}

/*
	供应商发票信息
*/

struct ProviderInvoice{
  // 公司发票抬头
  1: string invoice_company_name,
  2: ProviderAddress company_addr,
  3: ProviderContactor company_contactor,
  4: optional bool is_deactive,
  5: optional string id
}

/*
	支付信息
*/
struct ProviderPrepayRate{
  // 比例
  1: double rate ,
  2: string note
}

/*
	仓库信息
*/
struct ProviderWarehouse{
  // 仓库id
  1: string id,
  // 仓库名称
  2: string warehouse_name,
  // 仓库地址
  3: ProviderAddress warehouse_addr,
  // 仓库联系人
  4: list<ProviderContactor> warehouse_contactors,
  // 是否有效 False 有效, True 失效
  5: bool is_deactive
}

struct SellBrandsBrief {
  1: string brand_id,
  2: string name,
  3: string ename,
  4: string img_url
}

struct CategoryBrand {
  1: string category_id,
  2: list<SellBrandsBrief> brands,
  3: string second_category_id,
}

/*
	供应商信息
*/
struct ProviderProfile{
  // 供应商id
  1: string id,
  // 编号
  2: i64 seq_id,
  3: bool enabled,
  // 供应商编码
  4: string code ,
  // 供应商名称
  5: string name,
  6: optional string short_name,
  7: optional i32 status,
  8: optional string level,
  9: optional string ptype,
  10: optional string country,
  11: optional list<ProviderContactor> contactors,
  12: optional string url,
  13: optional string pay_method,
  14: optional list<string> mode,
  15: optional list<string> category,
  16: optional string bank,
  17: optional string bank_account,
  18: optional string bank_account_name,
  19: optional string hw_bank_code_type,
  20: optional string hw_bank_code,
  21: optional string hw_bank_addr,
  22: optional string contact_address,
  23: optional string register_address,
  24: optional string postcode,
  25: optional string note,
  26: optional bool available,
  27: optional list<string> brands,
  28: optional ProviderCredentials qualif,
  29: list<ProviderPrepayRate> prepay_rate,
  30: string logistic,
  31: i32 pay_days,
  32: optional string applicant,
  33: optional string pur_audit,
  34: optional string fin_audit,
  35: optional string start_calc,
  36: optional ProviderInvoice invoice,
  37: optional list<ProviderWarehouse> warehouses,
  38: optional string primary_account_no,
  39: optional list<ProviderInvoice> invoices,
  40: optional string aqua_email,
  41: optional list<SellBrandsBrief> sell_brands,
  42: optional list<CategoryBrand> sell_category_brands,
  43: optional i64 registered_capital,
  44: optional string registered_capital_currency,
  45: optional string found_at,
  46: optional string scale
}

struct ProviderProfileSimplified{
  // 供应商id
  1: string id,
  // 编号
  2: i64 seq_id,
  3: bool enabled,
  // 供应商编码
  4: string code ,
  // 供应商名称
  5: string name,
  6: optional string short_name,
  7: optional i32 status,
}

struct ProviderBrief{
  1: string code,
  2: optional string name,
  3: optional string short_name,
  4: optional string contact_address,
  5: optional string register_address
}

struct ProviderAccount {
  1: string name,
  2: string primary_account_no,
  3: string code
}

struct ProviderReview {
  1: optional string review_id,
  2: optional string provider_code,
  3: optional string provider_name,
  4: optional string review_type,
  5: optional ProviderProfile provider,
  6: optional i64 time,
  7: optional i64 reviewed_time,
  8: optional bool is_deactivated,
  9: optional i64 status,
  10: optional list<string> fields,
  11: optional string operator,
  12: optional string operator_no,
  13: optional string reviewer,
  14: optional string reviewer_no,
  15: optional string reason,
}

struct ProviderReviewBrief {
  1: optional string review_id,
  2: optional string provider_code,
  3: optional string provider_name,
  4: optional string operator,
  5: optional string pur_audit,
  6: optional i64 time,
  7: optional i64 registered_capital,
  8: optional string registered_capital_currency,
  9: optional string found_at,
  10: optional string scale,
  11: optional i32 status,
  12: optional bool editable,
}